﻿//----------------------------------------------------------------
// Desc: 
// Edit: ShowLong, http://blog.csdn.net/showlong
//
// Date Created: 2009-10-15
//
// Update Date :            
//
// Copyright (c) Fuel4D (http://www.fuel4d.com), All rights reserved.
//
//----------------------------------------------------------------
#pragma once


class FAPI FUI_Progress : public FUI_Object
{
    FUI_DECLARE_CLASS(FUI_Progress)

public:
    FUI_Progress(EF_UI_WIDGET_TYPE t = eUWT_Progress);
    virtual void Render(EF_UI_RENDER_LAYER layer);
    virtual bool GetCursorResult(EF_UI_EVENT_TYPE t){ return false; }

    // 设置当前进度值，范围[0-1]
    void  SetValue(float fValue);
    // 获取当前进度值，范围[0-1]
    FINLINE float GetValue() { return fRealValue; }

protected:
    virtual void InitUIData(FUI_Object* father, fuWidgetBase* pData, FUI_Layout* layout);

protected:
    fuWidgetProgress*   pProgressData;  // 控件数据地址
    float               fRealValue;     // 进度条百分比
};